import { NestMiddleware, Injectable, Logger } from '@nestjs/common';
import { NextFunction, Request, Response } from 'express';

@Injectable()
export class LogMiddleware implements NestMiddleware {
  use(req: Request, res: Response, next: NextFunction) {
    // 中间件逻辑
    console.log('Request: ' + req.url);
    Logger.log('Request: ' + req.url);
    next();
  }
}
